﻿create PROCEDURE Sync.SP_CommitteeBankAccountDepositReceipts_SelectChanges
@LastRowVersion rowversion,
@FilterdColumn UNIQUEIDENTIFIER
AS 
BEGIN 
	SELECT 
        t.[CommitteeBankAccountDepositReceiptID],
		g.[CommitteeBankAccountDepositID],g.[ReceiptID],
		t.IsDeleted,
		t.LastUpdatedDate
	FROM [dbo].[CommitteeBankAccountDepositReceipts] g RIGHT JOIN Sync.CommitteeBankAccountDepositReceipts_Tracking t  
    ON t.CommitteeBankAccountDepositReceiptID = g.CommitteeBankAccountDepositReceiptID 
	WHERE @LastRowVersion IS NULL OR t.Version > @LastRowVersion
    END





